#!/bin/sh
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0
echo "$FILES" | xargs pnpm prettier --experimental-cli --write --ignore-unknown
echo "$FILES" | xargs git add

exit 0
